package com.hdc.controller;

import com.hdc.service.BaseService;
import com.hdc.service.BodyPassImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;

/**
 * Created by chenyq5 on 2016-11-16.
 */
@Controller
@RequestMapping("/test")
public class helloController {

 @Autowired
 @Qualifier("bodyPassImpl")
    private BaseService baseService;

    @RequestMapping("/hello")
    public String hello() {
        boolean b=false;
        try {
             b = ((BodyPassImpl) baseService).saveTx();
            System.out.println("结果："+b);
        } catch (Exception e) {
            e.printStackTrace();
            System.out.println("结果：aa"+b);
        }
        return "hello";
    }
}
